<%@ page import="bean.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>INDEX</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>

<div>
<div style="font-size:20px;margin:0;text-align: center;">
<%
User user = (User) request.getSession().getAttribute("user");
System.out.println(user + "...................................................") ;
if(user != null) {
    System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
%>
<table width="200" id="myTable" border="0" align="center" cellpadding="1" cellspacing="0" >
<tbody>
<tr>
<th>username</th>
<td><%=user.getUsername()%></td>
</tr>
<tr>
<th>name</th>
<td><%=user.getName()%></td>
</tr>
<tr>
<th>group</th>
<td><%=user.getGroup()%></td>
</tr>
<tr>
<th>openid</th>
<td><%=user.getOpenid()%></td>
</tr>
<tr>
<th>wx_openid</th>
<td><%=user.getWx_openid()%></td>
</tr>
</tbody>
</table>

<form action="Logout">
<button type=submit id="submit1" name="submit2" style="width:60px;margin: 0;">
登出
</button>
</form>
<%}
else{
%>
<form action="Login">
<button type=submit id="submit2" name="submit2" style="width:50%;margin: 0;font-size:30px;">
登入
</button>
</form>
<%}%>
</div>
</div>
</body>
</html>
